<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <title>登录</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico">
    <link href="css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="css/font-awesome.css?v=4.4.0" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=4.1.0" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html"/>
    <![endif]-->
    <script>
        if (window.top !== window.self) {
            window.top.location = window.location;
        }
    </script>

    <style type="text/css">
        .login-fail {
            color: red;
        }
    </style>
</head>

<body class="gray-bg">

<div class="middle-box text-center loginscreen  animated fadeInDown" style="width: 100%; max-width: 100%">
    <div style="margin-top: 100px;">
        <div>
            <!-- <h1 class="logo-name">h</h1> -->
        </div>
        <h2 id="msg"></h2>
    </div>
</div>

<!-- 全局js -->
<script src="js/jquery.min.js?v=2.1.4"></script>
<script src="js/bootstrap.min.js?v=3.3.6"></script>

<script type="text/javascript">

    (function ($) {
        $.getUrlParam = function (name) {
            let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
            let r = window.location.search.substr(1).match(reg);
            if (r != null) return decodeURI(r[2]);
            return null;
        }
    })(jQuery);

    $(function () {
        //登录失败
        let errorType = $.getUrlParam('errorType');
        if (errorType === 1 || errorType === '1') {
            $('#msg').text('cas没有回传用户数据，请联系管理员。');
        }

        if (errorType === 2 || errorType === '2') {
            //通过cas回传的用户名/工号["+ loginName +"]没有查询到用户数据。
            $('#msg').text('无权访问此服务。');
        }
    })
</script>

</body>

</html>
